﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text.Json.Serialization;
using System.Threading.Tasks;
using FreeSql.DataAnnotations;
using Magicodes.ExporterAndImporter.Core;
using Magicodes.ExporterAndImporter.Excel;
using Newtonsoft.Json;

namespace Bzzb.Model
{
    [ExcelExporter(Name = "保障设备")]
    [Table(Name = "baozhangshebei")]
    public class BaoZhangSheBei
    {
        [IEIgnore(IsExportIgnore = true)]
        [Column(IsIdentity = true, IsPrimary = true, Name = "id")]
        [JsonProperty("id")]
        public long Id { get; set; }

        [IEIgnore(IsExportIgnore = true)]
        [Column(Name = "bstid")]
        [JsonProperty("bstid")]
        [Description("保障设备类型ID")]
        public long Bstid { get; set; }

        [ExporterHeader(DisplayName = "战区")]
        [Column(Name = "zq")]
        [JsonProperty("zq")]
        [Description("战区")]
        public string Zq { get; set; }

        [ExporterHeader(DisplayName = "军区")]
        [Column(Name = "Jq")]
        [JsonProperty("Jq")]
        [Description("军区")]
        public string Jq { get; set; }

        [ExporterHeader(DisplayName = "师区")]
        [Column(Name = "sq")]
        [JsonProperty("sq")]
        [Description("师区")]
        public string Sq { get; set; }

        [ExporterHeader(DisplayName = "团区")]
        [Column(Name = "tq")]
        [JsonProperty("tq")]
        [Description("团区")]
        public string Tq { get; set; }

        [ExporterHeader(DisplayName = "标准总序号")]
        [Column(Name = "bzzxh")]
        [JsonProperty("bzzxh")]
        [Description("标准总序号")]
        public string Bzzxh { get; set; }

        [ExporterHeader(DisplayName = "机型")]
        [Column(Name = "jx")]
        [JsonProperty("jx")]
        [Description("机型")]
        public string Jx { get; set; }

        [ExporterHeader(DisplayName = "类型")]
        [Column(Name = "lx")]
        [JsonProperty("lx")]
        [Description("类型")]
        public string Lx { get; set; }

        [ExporterHeader(DisplayName = "内外场")]
        [Column(Name = "nwc")]
        [JsonProperty("nwc")]
        [Description("内外场")]
        public string Nwc { get; set; }

        [ExporterHeader(DisplayName = "专业")]
        [Column(Name = "zy")]
        [JsonProperty("zy")]
        [Description("专业")]
        public string Zy { get; set; }

        [ExporterHeader(DisplayName = "保障设备唯一编码")]
        [Column(Name = "bzsbwybm")]
        [JsonProperty("bzsbwybm")]
        [Description("保障设备唯一编码")]
        public string Bzsbwybm { get; set; }

        [ExporterHeader(DisplayName = "设备名称")]
        [Column(Name = "sbmc")]
        [JsonProperty("sbmc")]
        [Description("设备名称")]
        public string Sbmc { get; set; }

        [ExporterHeader(DisplayName = "型号")]
        [Column(Name = "xh")]
        [JsonProperty("xh")]
        [Description("型号")]
        public string Xh { get; set; }

        [ExporterHeader(DisplayName = "使用时机")]
        [Column(Name = "sysj")]
        [JsonProperty("sysj")]
        [Description("使用时机")]
        public string Sysj { get; set; }

        [ExporterHeader(DisplayName = "功能用途")]
        [Column(Name = "gnyt")]
        [JsonProperty("gnyt")]
        [Description("功能用途")]
        public string Gnyt { get; set; }

        [ExporterHeader(DisplayName = "存放库区")]
        [Column(Name = "cfkq")]
        [JsonProperty("cfkq")]
        [Description("存放库区")]
        public string Cfkq { get; set; }

        [ExporterHeader(DisplayName = "库区具体位置")]
        [Column(Name = "kqjtwz")]
        [JsonProperty("kqjtwz")]
        [Description("库区具体位置")]
        public string Kqjtwz { get; set; }

        [ExporterHeader(DisplayName = "设备图像")]
        [Column(Name = "sbtx")]
        [JsonProperty("sbtx")]
        [Description("设备图像")]
        public string Sbtx { get; set; }

        [ExporterHeader(DisplayName = "生产厂家")]
        [Column(Name = "sccj")]
        [JsonProperty("sccj")]
        [Description("生产厂家")]
        public string Sccj { get; set; }

        [ExporterHeader(DisplayName = "出厂号码")]
        [Column(Name = "cchm")]
        [JsonProperty("cchm")]
        [Description("出厂号码")]
        public string Cchm { get; set; }

        [ExporterHeader(DisplayName = "出厂日期", Format = "yyyy-mm-DD hh:mm:ss")]
        [Column(Name = "ccrq", DbType = "datetime(0) NOT NULL")]
        [JsonProperty("ccrq")]
        [Description("出厂日期")]
        public DateTime Ccrq { get; set; }

        [ExporterHeader(DisplayName = "接装日期", Format = "yyyy-mm-DD hh:mm:ss")]
        [Column(Name = "jzrq", DbType = "datetime(0) NOT NULL")]
        [JsonProperty("jzrq")]
        [Description("接装日期")]
        public DateTime Jzrq { get; set; }

        [ExporterHeader(DisplayName = "接装验收人")]
        [Column(Name = "jzysr")]
        [JsonProperty("jzysr")]
        [Description("接装验收人")]
        public string Jzysr { get; set; }

        [ExporterHeader(DisplayName = "保管使用维护人")]
        [Column(Name = "bgsywhr")]
        [JsonProperty("bgsywhr")]
        [Description("保管使用维护人")]
        public string Bgsywhr { get; set; }

        [ExporterHeader(DisplayName = "调配类型")]
        [Column(Name = "dplx")]
        [JsonProperty("dplx")]
        [Description("调配类型")]
        public string Dplx { get; set; }

        [ExporterHeader(DisplayName = "调配日期", Format = "yyyy-mm-DD hh:mm:ss")]
        [Column(Name = "dprq", DbType = "datetime(0) NOT NULL")]
        [JsonProperty("dprq")]
        [Description("调配日期")]
        public DateTime Dprq { get; set; }

        [ExporterHeader(DisplayName = "调配依据")]
        [Column(Name = "dpyj")]
        [JsonProperty("dpyj")]
        [Description("调配依据")]
        public string Dpyj { get; set; }

        [ExporterHeader(DisplayName = "调配说明")]
        [Column(Name = "dpsm")]
        [JsonProperty("dpsm")]
        [Description("调配说明")]
        public string Dpsm { get; set; }

        [ExporterHeader(DisplayName = "外形尺寸")]
        [Column(Name = "wxcc")]
        [JsonProperty("wxcc")]
        [Description("外形尺寸")]
        public string Wxcc { get; set; }

        [ExporterHeader(DisplayName = "体积")]
        [Column(Name = "tj")]
        [JsonProperty("tj")]
        [Description("体积")]
        public string Tj { get; set; }

        [ExporterHeader(DisplayName = "寿命")]
        [Column(Name = "sm")]
        [JsonProperty("sm")]
        [Description("寿命")]
        public string Sm { get; set; }

        [ExporterHeader(DisplayName = "是否质保期内")]
        [Column(Name = "sfzbqn")]
        [JsonProperty("sfzbqn")]
        [Description("是否质保期内")]
        public string Sfzbqn { get; set; }

        [ExporterHeader(DisplayName = "质保期")]
        [Column(Name = "zbq")]
        [JsonProperty("zbq")]
        [Description("质保期")]
        public string Zbq { get; set; }

        [ExporterHeader(DisplayName = "质保期起算日期", Format = "yyyy-mm-DD hh:mm:ss")]
        [Column(Name = "zbqqsrq", DbType = "datetime(0) NOT NULL")]
        [JsonProperty("zbqqsrq")]
        [Description("质保期起算日期")]
        public DateTime Zbqqsrq { get; set; }

        //[Column(Name = "bz")]
        //[JsonProperty("bz")]
        //[Description("备注")]
        //public string Bz { get; set; }

        [IEIgnore(IsExportIgnore = true)]
        [Column(Name = "created", ServerTime = DateTimeKind.Local, CanUpdate = false, DbType = "datetime(0) NOT NULL")]
        [JsonProperty("created")]
        public DateTime Created { get; set; }

        [IEIgnore(IsExportIgnore = true)]
        [Column(Name= "updated", ServerTime = DateTimeKind.Local, DbType = "datetime(0) NOT NULL")]
        [JsonProperty("updated")]
        public DateTime Updated { get; set; }
    }
}
